//
//  CustomIndicatorView.swift
//  Speek
//
//  Created by MikeHo on 2023/7/6.
//

import SwiftUI

struct CustomIndicatorView: View {
    var totalPages: Int
    var currentPages: Int
    var activeTint: Color = .white
    var inActiveTint:Color = .gray.opacity(0.5)
    
    var body: some View {
        HStack(spacing:8){
            ForEach(0..<totalPages,id: \.self){
                Circle()
                    .fill(currentPages == $0 ? activeTint:inActiveTint)
                    .frame(width: 4,height: 4)
            }
        }
    }
}

struct CustomIndicatorView_Previews: PreviewProvider {
    static var previews: some View {
        IntroView()
    }
}
